package com.zaiten;

import org.json.JSONObject;

import com.tencent.stat.StatConfig;
import com.tencent.stat.StatCustomLogger;
import com.tencent.stat.StatDataTransfer;
import com.tencent.stat.StatExceptionCallBack;
import com.tencent.stat.StatReportStrategy;
import com.tencent.stat.StatService;

import android.content.Context;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.BA.Author;
import anywheresoftware.b4a.BA.DependsOn;
import anywheresoftware.b4a.BA.Permissions;
import anywheresoftware.b4a.BA.ShortName;
import anywheresoftware.b4a.BA.Version;

@ShortName("QQMTA")
@Author("icefairy333")
@Permissions(values = { "android.permission.INTERNET", "android.permission.ACCESS_NETWORK_STATE", "android.permission.ACCESS_WIFI_STATE", "android.permission.READ_PHONE_STATE", "android.permission.WRITE_EXTERNAL_STORAGE", "android.permission.WRITE_SETTINGS", "android.permission.ACCESS_COARSE_LOCATION", "android.permission.ACCESS_FINE_LOCATION", "android.permission.GET_TASKS" })
@Version(1.0f)
@DependsOn(values = { "mta-android-stat-sdk-2.1.0_20160111","mid-mid-sdk-2.3" })

/**
* Created with Basic4Android Library Generator - by XverhelstX
*/
public class QQMTA{
	public StatReportStrategy SR_APP_LAUNCH=StatReportStrategy.APP_LAUNCH;
	public StatReportStrategy SR_BATCH=StatReportStrategy.BATCH;
	public StatReportStrategy SR_INSTANT=StatReportStrategy.INSTANT;
	public StatReportStrategy SR_ONLY_WIFI=StatReportStrategy.ONLY_WIFI;
	public StatReportStrategy SR_ONLY_WIFI_NO_CACHE=StatReportStrategy.ONLY_WIFI_NO_CACHE;
	public StatReportStrategy SR_PERIOD=StatReportStrategy.PERIOD;
	public StatReportStrategy SR_DEVELOPER=StatReportStrategy.DEVELOPER;
	
	private BA ba;
	private String eventName;

	public void Initialize(final BA ba, String EventName) {
		this.ba = ba;
		this.eventName = EventName.toLowerCase(BA.cul);
		StatConfig.init(ba.context);
	}
	public void initNativeCrashReport(String eventName) {
		StatConfig.initNativeCrashReport(ba.context, eventName);
	}

	public boolean isDebugEnable(){
		return StatConfig.isDebugEnable();
	}
	public void trackCustomEvent(String eventName) {
		StatService.trackCustomEvent(ba.context, eventName);
	}
	public void setDebugEnable(boolean arg0){
		StatConfig.setDebugEnable(arg0);
	}

	public boolean isEnableStatService(){
		return StatConfig.isEnableStatService();
	}

	public void setEnableStatService(boolean arg0){
		StatConfig.setEnableStatService(arg0);
	}

	public int getSessionTimoutMillis() {
		return StatConfig.getSessionTimoutMillis();
	}

	public void setSessionTimoutMillis(int arg0){
		StatConfig.setSessionTimoutMillis(arg0);
	}

	public void onResume() {
		StatService.onResume(ba.context);
	}

	public void onStop() {
		StatService.onStop(ba.context);
	}
	public void setStatSendStrategy(StatReportStrategy arg0) {
		StatConfig.setStatSendStrategy(arg0);
	}
	public void onLowMemory() {
		StatService.onLowMemory(ba.context);
	}
	public void onPause() {
		StatService.onPause(ba.context);
	}
	public void updateDontReportEventIdsSet(String arg0){
		StatConfig.updateDontReportEventIdsSet(arg0);
	}

	public int getMaxImportantDataSendRetryCount() {
		return StatConfig.getMaxImportantDataSendRetryCount();
	}

	public void setMaxImportantDataSendRetryCount(int arg0){
		StatConfig.setMaxImportantDataSendRetryCount(arg0);
	}

	public int getMaxBatchReportCount() {
		return StatConfig.getMaxBatchReportCount();
	}

	public void setMaxBatchReportCount(int arg0){
		StatConfig.setMaxBatchReportCount(arg0);
	}

	public void setMaxSendRetryCount(int arg0){
		StatConfig.setMaxSendRetryCount(arg0);
	}

	public int getMaxSendRetryCount() {
		return StatConfig.getMaxSendRetryCount();
	}

	public int getNumEventsCommitPerSec() {
		return StatConfig.getNumEventsCommitPerSec();
	}

	public void setNumEventsCommitPerSec(int arg0){
		StatConfig.setNumEventsCommitPerSec(arg0);
	}

	public int getMaxStoreEventCount() {
		return StatConfig.getMaxStoreEventCount();
	}

	public void setMaxStoreEventCount(int arg0){
		StatConfig.setMaxStoreEventCount(arg0);
	}


	public String getAppKey() {
		return StatConfig.getAppKey(ba.context);
	}


	public void setAppKey(String arg0){
		StatConfig.setAppKey(arg0);
	}

	public String getInstallChannel() {
		return StatConfig.getInstallChannel(ba.context);
	}

	public void setInstallChannel(String arg0){
		StatConfig.setInstallChannel(arg0);
	}

	public void setInstallChannel(Context arg0, String arg1){
		StatConfig.setInstallChannel(arg0, arg1);
	}

	public String getQQ() {
		return StatConfig.getQQ(ba.context);
	}

	public void setQQ(Context arg0, String arg1){
		StatConfig.setQQ(arg0, arg1);
	}

	public void setSendPeriodMinutes(int arg0){
		StatConfig.setSendPeriodMinutes(arg0);
	}

	public String getMTAPreferencesFileName() {
		return StatConfig.getMTAPreferencesFileName();
	}

	public void setMTAPreferencesFileName(String arg0){
		StatConfig.setMTAPreferencesFileName(arg0);
	}

	public int getNumOfMethodsCalledLimit() {
		return StatConfig.getNumOfMethodsCalledLimit();
	}

	public void setNumOfMethodsCalledLimit(int arg0, long arg1){
		StatConfig.setNumOfMethodsCalledLimit(arg0, arg1);
	}

	public long getMsPeriodForMethodsCalledLimitClear() {
		return StatConfig.getMsPeriodForMethodsCalledLimitClear();
	}

	public int getSendPeriodMinutes() {
		return StatConfig.getSendPeriodMinutes();
	}

	public int getMaxParallelTimmingEvents() {
		return StatConfig.getMaxParallelTimmingEvents();
	}

	public void setMaxParallelTimmingEvents(int arg0){
		StatConfig.setMaxParallelTimmingEvents(arg0);
	}

	public boolean isEnableSmartReporting(){
		return StatConfig.isEnableSmartReporting();
	}

	public void setEnableSmartReporting(boolean arg0){
		StatConfig.setEnableSmartReporting(arg0);
	}

	public boolean isAutoExceptionCaught(){
		return StatConfig.isAutoExceptionCaught();
	}

	public void setAutoExceptionCaught(boolean arg0){
		StatConfig.setAutoExceptionCaught(arg0);
	}

	public String getStatReportUrl() {
		return StatConfig.getStatReportUrl();
	}

	public void setStatReportUrl(String arg0){
		StatConfig.setStatReportUrl(arg0);
	}

	public String getStatReportHost() {
		return StatConfig.getStatReportHost();
	}

	public int getMaxSessionStatReportCount() {
		return StatConfig.getMaxSessionStatReportCount();
	}

	public void setMaxSessionStatReportCount(int arg0){
		StatConfig.setMaxSessionStatReportCount(arg0);
	}

	public int getCurSessionStatReportCount() {
		return StatConfig.getCurSessionStatReportCount();
	}

	public int getMaxDaySessionNumbers() {
		return StatConfig.getMaxDaySessionNumbers();
	}

	public void setMaxDaySessionNumbers(int arg0){
		StatConfig.setMaxDaySessionNumbers(arg0);
	}

	public int getMaxReportEventLength() {
		return StatConfig.getMaxReportEventLength();
	}

	public void setMaxReportEventLength(int arg0){
		StatConfig.setMaxReportEventLength(arg0);
	}

	public boolean isEnableConcurrentProcess(){
		return StatConfig.isEnableConcurrentProcess();
	}

	public void setEnableConcurrentProcess(boolean arg0){
		StatConfig.setEnableConcurrentProcess(arg0);
	}

	public String getCustomUserId() {
		return StatConfig.getCustomUserId(ba.context);
	}

	public void setCustomUserId(Context arg0, String arg1){
		StatConfig.setCustomUserId(arg0, arg1);
	}

	public void setNativeCrashDebugEnable(boolean arg0){
		StatConfig.setNativeCrashDebugEnable(arg0);
	}

	public void initNativeCrashReport(Context arg0, String arg1){
		StatConfig.initNativeCrashReport(arg0, arg1);
	}

	public String getMid() {
		return StatConfig.getMid(ba.context);
	}

	public String getLocalMidOnly() {
		return StatConfig.getLocalMidOnly(ba.context);
	}

	public void setXGProMode(boolean arg0){
		StatConfig.setXGProMode(arg0);
	}

	public boolean isXGProMode(){
		return StatConfig.isXGProMode();
	}

	public StatCustomLogger getCustomLogger() {
		return StatConfig.getCustomLogger();
	}

	public void setCustomLogger(StatCustomLogger arg0){
		StatConfig.setCustomLogger(arg0);
	}

	public boolean isReportEventsByOrder(){
		return StatConfig.isReportEventsByOrder();
	}

	public void setReportEventsByOrder(boolean arg0){
		StatConfig.setReportEventsByOrder(arg0);
	}

	public int getNumEventsCachedInMemory() {
		return StatConfig.getNumEventsCachedInMemory();
	}

	public void setNumEventsCachedInMemory(int arg0){
		StatConfig.setNumEventsCachedInMemory(arg0);
	}

	public long getFlushDBSpaceMS() {
		return StatConfig.getFlushDBSpaceMS();
	}

	public void setFlushDBSpaceMS(long arg0){
		StatConfig.setFlushDBSpaceMS(arg0);
	}

	public int getReportCompressedSize() {
		return StatConfig.getReportCompressedSize();
	}

	public void setReportCompressedSize(int arg0){
		StatConfig.setReportCompressedSize(arg0);
	}

	public StatDataTransfer getDataTransfer() {
		return StatConfig.getDataTransfer();
	}

	public void setDataTransfer(StatDataTransfer arg0){
		StatConfig.setDataTransfer(arg0);
	}


	public void setStatExCallBack(StatExceptionCallBack arg0){
		StatConfig.setStatExCallBack(arg0);
	}

	public String getAppVersion() {
		return StatConfig.getAppVersion();
	}

	public void setAppVersion(String arg0){
		StatConfig.setAppVersion(arg0);
	}

	public JSONObject getCustomGlobalReportContent() {
		return StatConfig.getCustomGlobalReportContent();
	}

	public void setCustomGlobalReportContent(JSONObject arg0){
		StatConfig.setCustomGlobalReportContent(arg0);
	}

	public void addSkipSessionReportAppkey(String arg0){
		StatConfig.addSkipSessionReportAppkey(arg0);
	}

	public void removeSkipSessionReportAppkey(String arg0){
		StatConfig.removeSkipSessionReportAppkey(arg0);
	}

	public long getBackgroundDelayTimestamp() {
		return StatConfig.getBackgroundDelayTimestamp();
	}

	public void setBackgroundDelayTimestamp(long arg0){
		StatConfig.setBackgroundDelayTimestamp(arg0);
	}

	public void enableCommitEventAtBackground(Context arg0, boolean arg1){
		StatConfig.enableCommitEventAtBackground(arg0, arg1);
	}

	public boolean isAntoActivityLifecycleStat(){
		return StatConfig.isAntoActivityLifecycleStat();
	}

	public void setAntoActivityLifecycleStat(boolean arg0){
		StatConfig.setAntoActivityLifecycleStat(arg0);
	}
}
